perm filename ROTAT.SAI[1,JMC] blob sn#005244 filedate 1970-01-02 generic text, type T, neo UTF8
00100	begin integer m,n,i,j,brk; real eps,x,y,z,c;label a;
00200	external real procedure realscan(reference string x;reference integer xx);
00300	string temp_shit;
00400	real procedure r(real u,lam);begin return(
00500	u+lam+1.0*(if u<0.5 then u else 1.0-u)↑2
00600	) end;
00700	a:
00800	outstr("
00900	x=");
01000	temp_shit←inchwl;  x←realscan(temp_shit,brk) ;
01100	outstr("c=");
01200	temp_shit←inchwl;  c←realscan(temp_shit,brk) ;
01300	outstr("n=");n←cvd(inchwl);
01400	
01500	y←x;m←0;
01600	for i←1 step 1 until n do begin
01700	m←m+(j←z←r(y,c));y←z-j end;
01800	if m > 0 then begin if y<x then m←m-1 end
01850	else if m<0 then begin if y>x then m←m+1 end;
01900	
02000	outstr("
02100	m = "&cvs(m)&
02200	", y = "&cvf(y));
02300	go to a;
02400	end;